When converting graphics system pixel content into a video stream, the source content is typically in an interleaved RGBA color space. Video encoders typically include inputs in a planar, subsampled YUV format such as YV12. Additionally, the source content will be stored in a graphics processor frame buffer memory, as a texture or render target.
The format conversion from interleaved RGBA to planar YV12 is conventionally done by reading back the RGBA source content to system memory, and then using the CPU to color-convert, subsample, and planarize. This CPU conversion is relatively expensive in CPU resources. Further, hand-written assembly code is often used to achieve interactive performance levels.